<template>
  <div class="diyfrom" :style="'padding:' +data.p_t/2+'px '+data.p_lr/2+'px '+data.p_b/2+'px'">
    <div class="diyfrom_div"  :style="'border-radius:' + this.data.r_t / 2 + 'px ' + this.data.r_t / 2 + 'px ' + this.data.r_b / 2 + 'px ' + this.data.r_b / 2 + 'px '">
      <div  v-for="(item, i) in data.list" :key="i" class="drag-item" v-bind:class="{'active-item': item.active && !hideline}">
        <customfrom :data="item"></customfrom>
      </div>
      <div class="btn-box" v-if="data.list.length>0">
        <div class="btn" :style="'background:' + data.input_color">{{ data.input_value }}</div>
      </div>
    </div>

  </div>
</template>

<script>
import customfrom from '@/components/customfrom/index';

export default {
  props: {
    data: {
      type: Object,
      default: {}
    }
  },
  data() {
    return {
      list: []
    };
  },
  // watch: {
  //   'data.id': {
  //     handler: function() {
  //       this.getdetail();
  //     }
  //   }
  // },
  components: {
    customfrom
  },
  methods: {

  }
};
</script>

<style lang="scss" scoped>
  .diyfrom{
    .diyfrom_div{
      background: #FFFFFF;
      overflow: hidden;
    }
    // background: #FFFFFF;
  }
.btn-box {
  overflow: hidden;
  padding: 16px 0;
  margin: 0 12px 0 12px;
  border-top: 1px solid #e6e7eb;
  .btn {
    width: 166px;
    height: 36px;
    background: linear-gradient(172.42deg, #ff3c29 0%, #ff6f29 94.38%);
    border-radius: 32px;
    font-family: PingFang SC;
    font-style: normal;
    font-weight: normal;
    font-size: 14px;
    line-height: 36px;
    color: #ffffff;
    margin: 0 auto;
    text-align: center;
  }
}
</style>
